package com.liziba.classloader;

/**
 * <p>
 *
 * </p>
 *
 * @Author: Liziba
 * @Date: 2021/5/31 21:39
 */
public class ClassLoaderRuleTest {

    public static void main(String[] args) {
        try {
            // 查看Java 类路径
            System.out.println(System.getProperty("java.class.path"));
            // 调用加载当前类的类加载器加载测试类ClassLoaderRuleTest
            Class<?> clazz = Class.forName("com.liziba.classloader.bean.Person");
            // 查看加载当前测试类的类加载器
            System.out.println(clazz.getClassLoader());
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
    }

}
